package com.zzptc.xiekaiyuan.exam;

import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;

public class MyApplication extends Application {

    static Context context;

    public static Context getContext() {
        return context;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
    }

    public static SharedPreferences getSharedPre() {
        //获取上下文  再获取共享首选项
        return context.getSharedPreferences("loginnew", Context.MODE_PRIVATE);
    }



}
